package com.csun.cmny.provider.device.phone.entity;

import com.csun.cmny.provider.model.enums.button.DmcCsunButtonBindTypeEnum;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-02-19 17:24
 * @Description: the enum phone event enum
 */
public enum PhoneEventEnum {

    /**
     * 撤防
     */
    PHONE_EVENT_DISARM("0x1401", "撤防"),

    /**
     * 布防
     */
    PHONE_EVENT_ARMING("0x3401", "布防"),

    /**
     * 遥控撤防
     */
    PHONE_EVENT_DISARM_REMOTE("0x1407", "遥控撤防"),

    /**
     * 遥控布防
     */
    PHONE_EVENT_ARMING_REMOTE("0x3407", "遥控布防"),

    /**
     * 网络撤防
     */
    PHONE_EVENT_DISARM_NET("0x140d", "网络撤防"),

    /**
     * 网络布防
     */
    PHONE_EVENT_ARMING_NET("0x340d", "网络布防"),

    /**
     * 电话撤防
     */
    PHONE_EVENT_DISARM_TEL("0x140c", "电话撤防"),

    /**
     * 电话布防
     */
    PHONE_EVENT_ARMING_TEL("0x340c", "电话布防"),

    /**
     * 周边撤防
     */
    PHONE_EVENT_DISARM_RIM("0x140b", "周边撤防"),

    /**
     * 周边布防
     */
    PHONE_EVENT_ARMING_RIM("0x340b", "周边布防"),

    /**
     * 火灾报警
     */
    PHONE_EVENT_FIRE_ALARM("0x1111", "火灾报警"),

    /**
     * 紧急报警
     */
    PHONE_EVENT_EMG_ALARM("0x1120", "紧急报警"),

    /**
     * 报警
     */
    PHONE_EVENT_ALARM("0x1130", "报警"),

    /**
     * 家中无人活动
     */
    PHONE_EVENT_NO_ONE_HOME("0x1162", "家中无人活动"),

    /**
     * 传感器电池低压
     */
    PHONE_EVENT_VOLTAGE_SENSOR_LOW("0x1384", "传感器电池低压"),

    /**
     * 设置改动
     */
    PHONE_EVENT_SET_CHANGE("0x1306", "设置改动"),

    /**
     * 无交流电
     */
    PHONE_EVENT_AC_NOT("0x1301", "无交流电"),

    /**
     * 电池电压低
     */
    PHONE_EVENT_VOLTAGE_BATTERY_LOW("0x1302", "电池电压低"),

    /**
     * 系统启动
     */
    PHONE_EVENT_SYS_START("0x1305", "系统启动"),;

    String event;

    String msg;

    PhoneEventEnum(String event, String msg) {
        this.event = event;
        this.msg = msg;
    }


    /**
     * Gets key.
     *
     * @return the key
     */
    public String getKey() {
        return event;
    }

    /**
     * Gets value.
     *
     * @return the value
     */
    public String getValue() {
        return msg;
    }

    /**
     * 获取key获取value
     *
     * @param event event
     *
     * @return value value
     */
    public static String getValue(String event) {
        for (PhoneEventEnum ele : PhoneEventEnum.values()) {
            if (event.equals(ele.getKey())) {
                return ele.getValue();
            }
        }
        return null;
    }
}
